-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix -contains to allow multiple terms with "OR" logic unless -and is added #1890
Conversation
Allow multiple occurrences of the -contains argument to be stored in a list. Previously, only the last occurrence was considered. Additionally, the behavior has been modified to default to OR logic, meaning that if multiple -contains arguments are provided, entries matching any of them will be included in the results.
… -contains option.
pyproject.toml
Outdated
@@ -42,7 +42,7 @@ rich = ">=12.2.0, <14.0.0" | |||
tzlocal = ">=4.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt | |||
|
|||
[tool.poetry.dev-dependencies] | |||
black = { version = ">=21.5b2", allow-prereleases = true } | |||
black = { version = ">=23.11.0", allow-prereleases = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two tests were failing (Mac-latest Python 3.11, 3.12) because they used a version of black that didn't support the Apple Silicon architecture (M1, M2 chips). Starting from version 23.11.0, black resolves this compatibility issue. For more details, refer to this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Solves #1877
Allow multiple occurrences of the -contains argument to be stored in a list. Previously, only the last occurrence was considered.
By default without "-and" it follows or logic, meaning that if multiple -contains arguments are provided, entries matching any of them will be included in the results.
With the -and flag entries containing all of them will be included in the results.
Default Or Behaviour
With -and
Checklist
for the same issue.